<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        canvas{
            display: block;
            margin:0 auto;
            border:1px red solid;
        }
    </style>
</head>
<body>
    <canvas width="800" height="600">
</body>
<script>
    var canvas = document.querySelector("canvas");
    var ctx = canvas.getContext("2d")


    ctx.moveTo(200,200);
    ctx.lineTo(400,200);
    ctx.arcTo(400,250,450,250,50);
    ctx.lineTo(450,450);
    ctx.arcTo(400,450,400,500,50);
    ctx.lineTo(200,500);
    ctx.arcTo(200,450,150,450,50);
    ctx.lineTo(150,250);
    ctx.arcTo(200,250,200,200,50);
    ctx.stroke();
</script>
</html>